
package com.woniuxy.yogaapp.handler;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.woniuxy.yogaapp.pojo.Appraise;
import com.woniuxy.yogaapp.pojo.Coach;
import com.woniuxy.yogaapp.service.AppraiseService;

import lombok.Data;

@Data
@Controller
@RequestMapping("/appraise")
@Scope("prototype")
public class AppraiseHandler {

	@Resource
	private AppraiseService appraiseService;;

	// 教练评论展示
	@RequestMapping("/show")
	@ResponseBody
	public List<Appraise> showOneAppraise(Coach coach) {
		List<Appraise> app = appraiseService.showAppraise(coach);
		return app;
	}

}
